package edu.sdjzu.exam.mapper;

import edu.sdjzu.exam.domain.ActivityLog;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Options;

@Mapper
public interface ActivityLogMapper {
    @Insert("INSERT INTO Activity_Logs (user_id, action, exam_id, created_at, ip_address, details) " +
            "VALUES (#{userId}, #{action}, #{examId}, #{createdAt}, #{ipAddress}, #{details})")
    @Options(useGeneratedKeys = true, keyProperty = "logId")
    void insert(ActivityLog activityLog);
}
